<!DOCTYPE HTML>
<html xmlns:wb="http://open.weibo.com/wb">
	<head>
		</script>
		<script type="text/javascript" async="" src="style/js/conversion.js"></script>
		<script src="style/js/allmobilize.min.js" charset="utf-8" id="allmobilize"></script>
		<style type="text/css"></style>
		<meta content="no-siteapp" http-equiv="Cache-Control">
		<link media="handheld" rel="alternate">
		<!-- end 云适配 -->
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<title>我的职位列表-东莞大学生兼职网站-最专业的企业端招聘平台</title>
		<meta content="23635710066417756375" property="qc:admins">
		
		<!-- <div class="web_root"  style="display:none">http://www.lagou.com</div> -->
		<script type="text/javascript">
			var ctx = "http://www.lagou.com";
			console.log(1);
		</script>
		<link href="http://www.lagou.com/images/favicon.ico" rel="Shortcut Icon">
		<link href="style/css/style.css" type="text/css" rel="stylesheet">
		<link href="style/css/external.min.css" type="text/css" rel="stylesheet">
		<link href="style/css/popup.css" type="text/css" rel="stylesheet">
		<script type="text/javascript" src="style/js/jquery.1.10.1.min.js"></script>
		<script src="style/js/jquery.lib.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="style/js/ajaxfileupload.js"></script>
		<script src="style/js/additional-methods.js" type="text/javascript"></script>
		<script type="text/javascript" src="style/js/neturl.js"></script>
		<script src="style/js/template-web.js" type="text/javascript" charset="utf-8"></script>
		<!--[if lte IE 8]>
    <script type="text/javascript" src="style/js/excanvas.js"></script>
<![endif]-->
		<script type="text/javascript">
			var youdao_conv_id = 271546;
		</script>
		<script src="style/js/conv.js" type="text/javascript"></script>
		<script src="style/js/ajaxCross.json" charset="UTF-8"></script>
	</head>
	<body>
		<div id="body">
			<div id="header">
				<div class="wrapper">
					<a href="index.html" class="logo" >
						<img src="style/images/logo.png" width="200" height="50" alt="东莞大学生兼职网站企业端" />
					</a>
					<ul id="navheader" class="reset">
						<li><a href="index.html">首页</a></li>
						<li><a href="myhome.html">我的公司</a></li>
						<li class="current"><a href="mList.html">我的职位</a></li>
						<li><a rel="nofollow" href="canInterviewResumes.html">应聘我的</a></li>
						<li><a rel="nofollow" href="create.html">发布职位</a></li>
					</ul>
					<dl class="collapsible_menu">
						<dt>
							
							<span><span id="uname"></span>&nbsp;</span>
							<span class="red dn" id="noticeDot-1"></span>
							<i></i>
						</dt>
						<dd><a href="mList.html">我发布的职位</a></dd>
						<dd><a href="canInterviewResumes.html">我收到的简历</a></dd>
						<dd class="btm"><a href="myhome.html">我的公司主页</a></dd>
						<dd class="logout" id="logout"><a rel="nofollow">退出</a></dd>
					</dl>
				</div>
			</div><!-- end #header -->
			<div id="container" class="jobs_list_container">

				<div class="clearfix jobs_list_container">
					<div class="content_l recommend_list">
						<h2 style="width:100%">以下是您创建的有效职位，如有新增职位请： <a class="more" href="create.html">发布职位信息&gt;&gt;</a></h2>

						<ul id="jobs_list" class="hot_pos reset jobs_list_container">
							<script type="jobs_html/html" id="jobs_tem">
								{{each jobs_json.jobs_data}}
								{{if $value.index%2 == 0}}
										<li class="clearfix">
											<div class="hot_pos_l">
												<div class="mb10">
													<a target="_blank" href="jobdetail.html?job_id={{$value.id}}">{{$value.title}}</a>
													&nbsp;
													<span class="c9">[{{$value.workPlace}}]</span>
												</div>
												<span><em class="c7">月薪：</em> {{$value.minMoney}}-{{$value.maxMoney}}</span>
												<span><em class="c7">最低学历：</em> 本科</span>
												<br>
												<span><em class="c7">工作时间：</em> {{$value.startTime}}到{{$value.endTime}}</span>
												<br>
												<span>该职位于 [{{$value.createTime}}] 发布</span>
											</div>
											<div class="hot_pos_r">
												<div class="mb10 recompany"><a target="_blank" href="{{$value.chttp}}">{{$value.cname}}</a></div>
												<span><em class="c7">行业：</em> {{$value.profession}}</span>
												<br>
												<span><em class="c7">负责人：</em> {{$value.contact}}</span>
												<span><em class="c7">规模：</em> {{$value.scale}}人</span>
												<ul class="companyTags reset">
													<li><a href="jobdetail.html?job_id={{$value.id}}">兼职详情</a></li>
													<li><a href="edit.html?job_id={{$value.id}}">编辑兼职</a></li>
													<li><a onclick="delete_job({{$value.id}})" style="color:#F63F27">删除兼职</a></li>
												</ul>
											</div>
											<div class="recommend">
												{{$value.employNum}}人
												<span>该职位需要招聘{{$value.employNum}}人 </span>
											</div>
										</li>
								{{else}}
										<li class="odd clearfix">
											<div class="hot_pos_l">
												<div class="mb10">
													<a target="_blank" href="jobdetail.html?job_id={{$value.id}}">{{$value.cname}}</a>
													&nbsp;
													<span class="c9">[{{$value.workPlace}}]</span>
												</div>
												<span><em class="c7">月薪：</em> {{$value.minMoney}}-{{$value.maxMoney}}</span>
												<span><em class="c7">最低学历：</em> 本科</span>
												<br>
												<span><em class="c7">工作时间：</em> {{$value.startTime}}到{{$value.endTime}}</span>
												<br>
												<span>该职位于 [{{$value.createTime}}] 发布</span>
											</div>
											<div class="hot_pos_r">
												<div class="mb10 recompany"><a target="_blank" href="{{$value.chttp}}">{{$value.cname}}</a></div>
												<span><em class="c7">行业：</em> {{$value.profession}}</span>
												<br>
												<span><em class="c7">负责人：</em> {{$value.contact}}</span>
												<span><em class="c7">规模：</em> {{$value.scale}}人</span>
												<ul class="companyTags reset">
													<li><a href="jobdetail.html?job_id={{$value.id}}">兼职详情</a></li>
													<li><a href="edit.html?job_id={{$value.id}}">编辑兼职</a></li>
													<li><a onclick="delete_job({{$value.id}})" style="color:#F63F27">删除兼职</a></li>
												</ul>
											</div>
											<div class="recommend">
												{{$value.employNum}}人
												<span>该职位需要招聘{{$value.employNum}}人 </span>
											</div>
										</li>
								{{/if}}
								{{/each}}
							</script>
						</ul>

						<form id="searchForm"></form>

					</div>
				</div>
				<input type="hidden" id="userid" name="userid" value="314873">

				<div class="clear"></div>
				<input type="hidden" value="" id="resubmitToken">
				<a rel="nofollow" title="回到顶部" id="backtop" style="display: none;"></a>
			</div><!-- end #container -->
		</div><!-- end #body -->
		<div id="footer">
			<div class="wrapper">
				<a rel="nofollow" target="_blank" href="about.html">联系我们</a>
				<a target="_blank" href="http://www.lagou.com/af/zhaopin.html">互联网公司导航</a>
				<a rel="nofollow" target="_blank" href="http://e.weibo.com/lagou720">我们的微博</a>
				<a rel="nofollow" href="javascript:void(0)" class="footer_qr">我们的微信<i></i></a>
				<div class="copyright">&copy;2019-2020 qiuxinxin <a href="http://www.baidu.com"
					 target="_blank">东莞理工学院城市学院备14023790号-2</a></div>
			</div>
		</div>

		<script src="style/js/core.min.js" type="text/javascript"></script>
		<script src="style/js/popup.min.js" type="text/javascript"></script>

		<!--  -->

		<script type="text/javascript">
			var company_id = "";
			var cname = "";
			var scale = "";
			var profession = "";
			var chttp = "";
			$(document).ready(function() {
				company_id = getCookie('company_id');
				if (company_id == '') {
					window.location.href = "login.html";
				}
				var uname = getCookie('uname');
				$('#uname').text(uname);
				$.ajax({ //传数据的方式
					url: ip_address + "/companys/info?id=" + company_id,
					type: "post",
					success: function(result, request) { //传数据成功之后的操作   result是servlet传过来的数据  这个函数对result进行处理，让它显示在 输入框中
						console.log('返回了' + JSON.stringify(result))
						var status = result.status;
						if (status == 0) {
							var data = result.data;
							cname = data.cname;
							scale = data.scale;
							chttp = data.chttp;
							var professions = data.profession;
							for (var i in professions) {
								if (i == professions.length - 1) {
									profession = profession + professions[i].name
								} else {
									profession = profession + professions[i].name + "、"
								}
							}
							getJob_list();
						} else {
							var msg = result.msg;
							alert(msg);
						}
					},
					error: function(Error) {
						console.log(Error);
					},
					complete: function(xhr, data) {
						console.log("complete");
					}
				});
			});
			//存cookie
			function setCookie(name, value) {
				var Days = 30;
				var exp = new Date();
				exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
				document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
			}
			$("#logout").click(function() {
				console.log("退出")
				setCookie('company_id', '')
				setCookie('cname', '')
				setCookie('cemail', '')
				window.location.href = "login.html";
			});

			function getJob_list() {
				$.ajax({ //传数据的方式
					url: ip_address + "/job/list?companyId=" + company_id,
					type: "post",
					success: function(result, request) { //传数据成功之后的操作   result是servlet传过来的数据  这个函数对result进行处理，让它显示在 输入框中
						console.log('返回了' + JSON.stringify(result))
						var status = result.status;
						if (status == 0) {
							var data = result.data;
							var jobs_data = result.data.records;
							for (var i in jobs_data) {
								jobs_data[i]["index"] = i
								jobs_data[i]["cname"] = cname;
								jobs_data[i]["scale"] = scale;
								jobs_data[i]["profession"] = profession;
								jobs_data[i]["chttp"] = chttp;
								var startTime = jobs_data[i]["startTime"]
								var endTime = jobs_data[i]["endTime"]
								if (startTime != "" && startTime != null) {
									jobs_data[i]["startTime"] = startTime.replace(" 00:00:00", "");
								}
								if (endTime != "" && endTime != null) {
									jobs_data[i]["endTime"] = endTime.replace(" 00:00:00", "");
									console.log("替换")
								}
							}
							var jobs_json = {}
							jobs_json['jobs_data'] = jobs_data
							var jobs_html = template('jobs_tem', {
								jobs_json: jobs_json
							})
							var jobs_list = document.querySelector('#jobs_list');
							jobs_list.innerHTML = jobs_html;
						} else {
							var msg = result.msg;
							alert(msg);
						}
					},
					error: function(Error) {
						console.log(Error);
					},
					complete: function(xhr, data) {
						console.log("complete");
					}
				});
			}

			function delete_job(job_id) {
				console.log("删除兼职");
				if (confirm("确定删除该职位?")) {
					//点击确定后操作
					$.ajax({ //传数据的方式
						url: ip_address + "/job/delete",
						type: "post",
						data: {
							companyId: company_id,
							id: job_id
						},
						success: function(result, request) { //传数据成功之后的操作   result是servlet传过来的数据  这个函数对result进行处理，让它显示在 输入框中
							console.log('返回了' + JSON.stringify(result))
							var status = result.status;
							if (status == 0) {
								getJob_list();
							} else {
								var msg = result.msg;
								alert(msg);
							}
						},
						error: function(Error) {
							console.log(Error);
						},
						complete: function(xhr, data) {
							console.log("complete");
						}
					});
				}
			}

			function getCookie(name) {
				var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
				if (arr = document.cookie.match(reg))
					return unescape(arr[2]);
				else
					return null;
			}
			$(function() {
				$('#noticeDot-1').hide();
				$('#noticeTip a.closeNT').click(function() {
					$(this).parent().hide();
				});
			});
			var index = Math.floor(Math.random() * 2);
			var ipArray = new Array('42.62.79.226', '42.62.79.227');
			var url = "ws://" + ipArray[index] + ":18080/wsServlet?code=314873";
			var CallCenter = {
				init: function(url) {
					var _websocket = new WebSocket(url);
					_websocket.onopen = function(evt) {
						console.log("Connected to WebSocket server.");
					};
					_websocket.onclose = function(evt) {
						console.log("Disconnected");
					};
					_websocket.onjobs = function(evt) {
						//alert(evt.data);
						var notice = jQuery.parseJSON(evt.data);
						if (notice.status[0] == 0) {
							$('#noticeDot-0').hide();
							$('#noticeTip').hide();
							$('#noticeNo').text('').show().parent('a').attr('href', ctx + '/mycenter/delivery.html');
							$('#noticeNoPage').text('').show().parent('a').attr('href', ctx + '/mycenter/delivery.html');
						} else {
							$('#noticeDot-0').show();
							$('#noticeTip strong').text(notice.status[0]);
							$('#noticeTip').show();
							$('#noticeNo').text('(' + notice.status[0] + ')').show().parent('a').attr('href', ctx +
								'/mycenter/delivery.html');
							$('#noticeNoPage').text(' (' + notice.status[0] + ')').show().parent('a').attr('href', ctx +
								'/mycenter/delivery.html');
						}
						$('#noticeDot-1').hide();
					};
					_websocket.onerror = function(evt) {
						console.log('Error occured: ' + evt);
					};
				}
			};
			CallCenter.init(url);
		</script>

		<div id="cboxOverlay" style="display: none;"></div>
		<div id="colorbox" class="" role="dialog" tabindex="-1" style="display: none;">
			<div id="cboxWrapper">
				<div>
					<div id="cboxTopLeft" style="float: left;"></div>
					<div id="cboxTopCenter" style="float: left;"></div>
					<div id="cboxTopRight" style="float: left;"></div>
				</div>
				<div style="clear: left;">
					<div id="cboxMiddleLeft" style="float: left;"></div>
					<div id="cboxContent" style="float: left;">
						<div id="cboxTitle" style="float: left;"></div>
						<div id="cboxCurrent" style="float: left;"></div><button type="button" id="cboxPrevious"></button><button type="button"
						 id="cboxNext"></button><button id="cboxSlideshow"></button>
						<div id="cboxLoadingOverlay" style="float: left;"></div>
						<div id="cboxLoadingGraphic" style="float: left;"></div>
					</div>
					<div id="cboxMiddleRight" style="float: left;"></div>
				</div>
				<div style="clear: left;">
					<div id="cboxBottomLeft" style="float: left;"></div>
					<div id="cboxBottomCenter" style="float: left;"></div>
					<div id="cboxBottomRight" style="float: left;"></div>
				</div>
			</div>
			<div style="position: absolute; width: 9999px; visibility: hidden; display: none;"></div>
		</div>
	</body>
</html>
